package model;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public class DistrDAO {
	
	// Init ---------------------------------------------------------------------------------------

    private static Map<Long, Distr> userMap = new LinkedHashMap<Long, Distr>();

    // Actions ------------------------------------------------------------------------------------

    public Distr find(Long key) {
        return userMap.get(key);
    }

    public static List<Distr> list() {
        return new ArrayList<Distr>(userMap.values());
    }

    public Map<Long, Distr> map() {
        return userMap;
    }
    
    public static void addDistr(Distr distr) {
    	userMap.put(distr.getId(), distr);
    }
    
    // Helpers ------------------------------------------------------------------------------------


}
